#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;


void solve()
{
    int n, m, q; cin >> n >> m >> q;
    vector<int> arr;
    for (int i = 0; i < m; i++)
    {
        int temp; cin >> temp; arr.push_back(temp);
    }
    sort(arr.begin(), arr.end());
    for (int i = 0; i < q; i++)
    {
        int pos; cin >> pos;
        if (pos < arr[0]) cout << arr[0] - 1 << endl;
        else if (pos > arr.back()) cout << n - arr.back() << endl;
        else
        {
            int head = 0, tail = arr.size() - 1;
            while (head < tail)
            {
                int mid = (head + tail) / 2 + 1;
                if (arr[mid] < pos) head = mid;
                else tail = mid - 1;
            }
            cout << (arr[head + 1] - arr[head] - 2) / 2 + 1 << endl;
        }
    }
}

int main()
{
    int t; cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}